package com.molichuxing.services.property;

/**
 * 
 * 邮件类型
 */
public enum RiskEmailTypeEnum {

	ORDER_REPAYMENT_REMINDER(1,"订单还款提醒"),
	VIOLATION_UNABLE_QUERY(3,"违章无法获取"),
	VIOLATION_UNTREATED(4,"违章未处理"),
	ORDER_OVERDUE_PAYMENT(5,"订单逾期还款通知"),
	MAINTENANCE_NOTICE(7,"保养通知"),
	DRIVINGLICENSE_AUDIT(14,"驾驶证审核"),
//	DRIVINGLICENSE_AUDIT_PHONE(16,"驾驶证审核发送短信"),
    ORDER_DEALER_WAITING_FOR_DEPARTURE(17,"商家订单待发车"),
    ORDER_DEALER_VEHICLE_TO_REPLACED(18,"商家订单待更换车辆"),
    OFFLINE_REPAYMENT_REVIEW(19,"线下还款审核"),
    CONTRACT_GENERATION_FAILED(20,"合同生成失败"),
	ORDER_DEALER_REPAYMENT_REMINDER(21,"商家订单还款提醒"),
	ORDER_DEALER_OVERDUE_PAYMENT(22, "商家订单逾期还款通知"),

	/**
	 * 订单审核提醒
	 */
	ORDER_ONE(23, "订单审核提醒"),
	ORDER_DEALER_REJECTION_PAYMENT(24, "车辆拒收通知"),
	/**
	 * PDI待检验提醒
	 */
	PDI_CHECK(25, "PDI待检验提醒"),
	/**
	 * PDI待争议处理提醒
	 */
	PDI_DISPUTES(26, "PDI待争议处理提醒");


	int value;
	String name;

	RiskEmailTypeEnum(int value, String name) {
		this.value = value;
		this.name = name;
	}

	public int getValue() {
		return value;
	}

	public String getName() {
		return name;
	}


	/**
	 * 通过value获取枚举的name
	 * 
	 * @param value
	 * @return
	 */
	public static String getName(int value) {
		RiskEmailTypeEnum enumerate = getEnum(value);
		return enumerate == null ? null : enumerate.getName();
	}

	/**
	 * 通过value获取枚举
	 * 
	 * @param value
	 * @return
	 */
	public static RiskEmailTypeEnum getEnum(int value) {
		for (RiskEmailTypeEnum enumerate : RiskEmailTypeEnum.values()) {
			if (enumerate.getValue() == value) {
				return enumerate;
			}
		}
		return null;
	}
}
